<template>
  <div id="page-yearplan">
    <h2>年度计划列表</h2>

    <card>
      <Input v-model="query.act_name" placeholder="请输入计划名称" style="width: 300px"></Input>
      <Button type="primary" @click="search()">查询</Button>
    </card>

    <card class="mt10">
      <div class="m10 clearfix">
        <Button type="info" class="fr" @click="onCreate()">新增计划</Button>
      </div>

      <yearplan-list :query="query" ref="yearplanList"></yearplan-list>
    </card>
  </div>
</template>

<script>
  import yearplanList from './components/list'

  export default {
    name: 'page-yearplan',
    components: {
      yearplanList
    },
    data () {
      return {
        query: {
          act_name: '',
          pk_rclub_info: null,
          currentPage: 1,
          limit: 10
        }
      }
    },
    methods: {
      search () {
        this.query.currentPage = 1
        this.$refs.yearplanList.getList()
      },
      onCreate () {
        this.$refs.yearplanList.showCreateModal()
      }
    }
  }
</script>

<style lang="less">
  #page-yearplan {}
</style>
